package com.bytebuffer;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufAllocator;
import io.netty.buffer.PooledByteBufAllocator;
import io.netty.util.internal.PlatformDependent;

public class PooledByteBufAllocatorHugeDemo {

	public static void main(String[] args) {
		ByteBufAllocator alloc = new PooledByteBufAllocator(PlatformDependent.directBufferPreferred());

		ByteBuf byteBuf = alloc.directBuffer(1024 * 1024 * 16 + 10);

	    //很重要，内存释放
	    byteBuf.release();
	}

}
